"""课堂案例"""
def calculate_sum(*numbers):
    return sum(numbers)

result = calculate_sum(1, 2, 3, 4, 5)
print(f"结果1等于={result}")  

#问题：what is numbers？

def calculate_sum2(**numbers):
    print(numbers.keys())
    print(numbers.values())
    return sum(numbers)

result = calculate_sum2(a=1, b=2, c=3, d=4, e=5)
print(f"结果2等于={result}")  


#问题：what is numbers？

# #Solution：
# def calculate_sum2(**numbers):
#     return sum(numbers.values())

# result = calculate_sum2(a=1, b=2, c=3, d=4, e=5)
# print(f"结果2等于={result}")  

# #问题：what is numbers？

"""
#可变位置参数
def example_func(*args):
    for arg in args:
        print(arg)
 
example_func(1, 2, 3, 4)

#可变关键字参数
def example_func(**kwargs):
    print(kwargs)
    for key, value in kwargs.items():
        print(f"{key}: {value}")
 
example_func(a=1, b=2, c=3)
"""